<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="style/css/reset/reset-min.css" media="all" />
        <link rel="stylesheet" type="text/css" href="style/css/reset/reset-fonts.css" media="all" />
        <link rel="stylesheet" type="text/css" href="style/css/page.css" media="all" />
        <link rel="stylesheet" type="text/css" href="../phpmy/style/css/mvc.css" media="all" />
        <link rel="stylesheet" type="text/css" href="style/css/form.css" media="all" />
        <link rel="stylesheet" type="text/css" href="../phpmy/style/css/topmenu.css" media="all" />
        <title>PHP meet YUI - Demo Foldable Elements</title>
        <script type="text/javascript">
            <!--
            // Base path to phpmy folder
            var PHPmYBaseUrl = BaseUrl = '../phpmy/';
            
            
            /* can be called when a link is clicked */
            function _body_onunload(){
                return;
            }
            
            /**
             * function is called when all external scripts are loaded
             */
            function jsReady(){
                // if you need to init some - do here                
                initView();
                return;
            }
            function initView(){
                var loader2 = new YAHOO.util.YUILoader({
                    base: PHPmYBaseUrl ? PHPmYBaseUrl + "js/yui/build/" : "phpmy/js/yui/build/" });
                // alert (loader);
                loader2.onSuccess = function(){ initViewLoadReady(); };
                loader2.onFailure = function(msg, xhrobj){ alert('Problem: ' + msg); };
                loader2.onProgress = function(o){ };
                //Add my modules to YUILoader
                loader2.addModule({
                    name: "phpmyanimation",
                    type: "js",
                    fullpath: PHPmYBaseUrl + "js/yui.animation.js",
                    varName: "phpmyanimation",
                    requires: ['animation','element','cookie']
                });    
                loader2.addModule({
                    name: "phpmyanimationstyle",
                    type: "css",
                    fullpath: PHPmYBaseUrl + "style/css/yui.animation.css",
                    varName: "phpmyanimationcss"
                });    
                loader2.require("phpmyanimation");
                loader2.require("phpmyanimationstyle");
                loader2.insert();
            }
            function initViewLoadReady (){    
                // handleownerc
                new phpmyContainerFoldable ('cont1');
                new phpmyContainerFoldable ('cont2');                
            }
            -->
        </script>
        <script type="text/javascript" src="../phpmy/js/yui/build/yuiloader/yuiloader-min.js">
        </script>
        <script type="text/javascript" src="../phpmy/js/loader.js">
        </script>
    </head>
    <body class="yui-skin-sam">
        <div id="pagemain" style="margin-top:10%;">
        <table width="100%">
            <tr>
                <td width="50%" valign="top"><div id="cont1" style="border:1px dotted red; height: 300px;">This is a foldable element</div></td>
                <td><div id="cont2" style="height: 350px; background-color: #A8ABCF;">This is a foldable element too</div></td>
            </tr>
        </table>        
        </div>
    </form>
    </body>
</html>
